
#include <cassert>
#include <fstream>
#include <iostream>
#include <sys/stat.h>
#include <unistd.h>
using namespace std;

int main() {
  mode_t mode = 0775;
  int e = mkdir("file", mode);
  
  cout << e << endl;
  ofstream of{"file/good.txt"};
  if (!of)
    cout << "cannot create file" << endl;
  of << "hello" << endl;
  of.close();
  return 0;
}